package com.autoglm.data.remote

import com.autoglm.data.model.GLMChatRequest
import com.autoglm.data.model.GLMChatResponse
import com.autoglm.data.model.TaskPlanningRequest
import com.autoglm.data.model.TaskPlanningResponse
import com.autoglm.data.model.IntentUnderstandingRequest
import com.autoglm.data.model.IntentUnderstandingResponse
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.Header
import retrofit2.http.POST

/**
 * GLM API服务接口
 */
interface GLMApiService {
    
    /**
     * 发送聊天请求到GLM模型
     */
    @POST("api/paas/v4/chat/completions")
    suspend fun chatCompletion(
        @Header("Authorization") authorization: String,
        @Body request: GLMChatRequest
    ): Response<GLMChatResponse>
    
    /**
     * 任务规划请求
     */
    @POST("api/paas/v4/chat/completions")
    suspend fun planTask(
        @Header("Authorization") authorization: String,
        @Body request: GLMChatRequest
    ): Response<GLMChatResponse>
    
    /**
     * 指令理解请求
     */
    @POST("api/paas/v4/chat/completions")
    suspend fun understandIntent(
        @Header("Authorization") authorization: String,
        @Body request: GLMChatRequest
    ): Response<GLMChatResponse>
}
